<?php
/* @var $this FriendlinkController */
/* @var $model Friendlink */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'friendlink-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array('validateOnSubmit'=>true)
)); ?>

	

	<?php echo $form->errorSummary($model); ?>

	<ul class="form_list form_list2 mt10">
                	<li class="c_f"><span class="tit"><em class="xing">*</em>选择类目：</span>
                        <div class="cont f_l">
                        	<?php echo $form->dropDownList($model,'zlc_id',CmpCat::model()->getCat(6),array('class'=>'s_ipt w_170')) ?>                        	
                            <?php echo CHtml::link('新增类目',array($this->pre_module_url.'/friendLinkCat/admin'),array('class'=>'c_06c','target'=>'_blank'))?>
                        	<span id="categoryTip"><?php echo $form->error($model,'zlc_id'); ?></span>
                        </div>
                    </li>
                    <li class="c_f"><span class="tit"><?php echo $form->labelEx($model,'zfl_title'); ?>：</span>
                        <div class="cont f_l"><?php echo $form->textField($model,'zfl_title',array('size'=>60,'maxlength'=>100,'class'=>'t_ipt w_300')); ?>
                        	<span id="newsnameTip"><?php echo $form->error($model,'zfl_title'); ?></span></div>
                    </li>                   
                    <li class="c_f"><span class="tit"><?php echo $form->labelEx($model,'zlc_type'); ?>：</span>
                        <div class="cont f_l type_box" id="tabAds">
                        	<div class="tab_hd">
                            	<ul class="c_f">
                                	<li>
                                		<?php echo $form->radioButtonList($model,'zlc_type',$model->getType(),array('class'=>'radio linktype')) ?>
                                	</li>
                                </ul>
                            </div>
                            <div class="tab_cont">
                            	<div class="link_box">
                            		<?php echo $form->labelEx($model,'zfl_url'); ?>
                            		<?php echo $form->textField($model,'zfl_url',array('size'=>60,'maxlength'=>255,'class'=>'t_ipt w_170')); ?>
                            		<?php echo $form->error($model,'zfl_url'); ?>
                            	</div>
                            </div>
                            <div class="tab_cont d_n" id="logo_item">
                            	<div class="link_box">
                            		<?php echo $form->labelEx($model,'zfl_logo'); ?>
									<?php echo $form->textField($model,'zfl_logo',array('size'=>60,'maxlength'=>255,'class'=>'t_ipt w_170')); ?>
									<?php echo $form->error($model,'zfl_logo'); ?>
								</div>
                            </div>
                        </div>
                    </li>
                    <li class="c_f"><span class="tit"><?php echo $form->labelEx($model,'zfl_desc'); ?>：</span>
	                    <div class="cont f_l">
							<?php echo $form->textArea($model,'zfl_desc',array('rows'=>6, 'cols'=>50)); ?>
							<?php echo $form->error($model,'zfl_desc'); ?>
						</div>
					</li>
					<li class="c_f"><span class="tit"><?php echo $form->labelEx($model,'zfl_listorder'); ?>：</span>
	                    <div class="cont f_l">
							<?php echo $form->textField($model,'zfl_listorder',array('class'=>'t_ipt w_100')); ?>
							<?php echo $form->error($model,'zfl_listorder'); ?>
						</div>
					</li>
                    <li class="c_f"><span class="tit"><?php echo $form->labelEx($model,'zfl_status'); ?>：</span>
                        <div class="cont f_l">
                        	<?php echo $form->radioButtonList($model,'zfl_status',$model->getStatus()) ?>
							<?php echo $form->error($model,'zfl_status'); ?>
						</div>
                    </li>
                    <li class="c_f"><span class="tit">&nbsp;</span>
                        <div class="cont f_l">
                        	<?php echo CHtml::submitButton($model->isNewRecord ? '创建' : '保存',array('class'=>'mem_btn mem_btn18 mr5')); ?></div>
                    </li>
                </ul>
<?php $this->endWidget(); ?>

</div><!-- form -->

<script type="text/javascript">
$('.linktype').bind('click',function(){
	if($(this).val()==1){
		$('#logo_item').slideUp("slow");
	}else{
		$('#logo_item').slideDown("slow");
	}
})
</script>